package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.manger.pojo.MangerUser;
import com.zhentao.service.MangerUserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/ma/user")
@Api(tags = "后台管理用户登入")
public class MaUserLoginController {
    @Autowired
    private MangerUserService mangerUserService;
    @PostMapping("/login/in")
    public ResponseResult maUserLogin(@RequestBody MangerUser mangerUser){
        return mangerUserService.maUserLogin(mangerUser);
    }
    @GetMapping("findById/{id}")
    public ResponseResult findById(@PathVariable("id") Integer id){
        return mangerUserService.findById(id);
    }
    @PostMapping("update")
    public ResponseResult update(@RequestBody MangerUser mangerUser){
        return mangerUserService.update(mangerUser);
    }
}
